﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace TGIApp.Model
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "ITGI" in both code and config file together.
    [ServiceContract]
    [CyclicReferencesAware(true)]
    public interface ITgiService
    {
        #region User
        
        [OperationContract]
        List<string> GetRolesForUser(string userName);

        #region Organizer (Clients)

        [OperationContract]
        List<User> GetAllClients();

        [OperationContract]
        User GetClientById(int id);

        [OperationContract]
        void CreateClient(User user);

        [OperationContract]
        void UpdateClient(User user);

        [OperationContract]
        void DeleteClient(User user);

        [OperationContract]
        void DeleteClientById(int id);
        #endregion

        #region Agents
        [OperationContract]
        List<User> GetAllAgents();

        [OperationContract]
        User GetAgentById(int id);

        [OperationContract]
        void CreateAgent(User user);

        [OperationContract]
        void UpdateAgent(User user);

        [OperationContract]
        void DeleteAgent(User user);

        [OperationContract]
        void DeleteAgentById(int id);

        #endregion

        #region Customers

        [OperationContract]
        List<User> GetAllCustomers();

        [OperationContract]
        User GetCustomerById(int id);

        [OperationContract]
        void CreateCustomer(User user);

        [OperationContract]
        void UpdateCustomer(User user);

        [OperationContract]
        void DeleteCustomer(User user);

        [OperationContract]
        void DeleteCustomerById(int id);

        #endregion

        #endregion 

        #region AgentBranches
        [OperationContract]
        List<AgentBranch> GetAllAgentBranches();

        [OperationContract]
        AgentBranch GetAgentBranchById(int id);

        [OperationContract]
        void CreateAgentBranch(AgentBranch agentBranch);

        [OperationContract]
        void UpdateAgentBranch(AgentBranch agentBranch);

        [OperationContract]
        void DeleteAgentBranch(AgentBranch agentBranch);

        [OperationContract]
        void DeleteAgentBranchById(int id);

        #endregion

        #region Roles
        [OperationContract]
        List<Role> GetAllRoles();

        [OperationContract]
        Role GetRoleById(int id);

        [OperationContract]
        void CreateRole(Role role);

        [OperationContract]
        void UpdateRole(Role role);

        [OperationContract]
        void DeleteRole(Role role);

        [OperationContract]
        void DeleteRoleById(int id);

        #endregion

        #region Events
        [OperationContract]
        List<Event> GetAllEvents();

        [OperationContract]
        Event GetEventById(int id);

        [OperationContract]
        void CreateEvent(Event evnt);

        [OperationContract]
        void UpdateEvent(Event evnt);

        [OperationContract]
        void DeleteEvent(Event evnt);

        [OperationContract]
        void DeleteEventById(int id);

        #endregion

        #region Venue
        
        [OperationContract]
        List<Venue> GetAllVenues();

        [OperationContract]
        Venue GetVenueById(int id);

        [OperationContract]
        void CreateVenue(Venue venue);

        [OperationContract]
        void UpdateVenue(Venue venue);

        [OperationContract]
        void DeleteVenue(Venue venue);

        [OperationContract]
        void DeleteVenueById(int id);

        #endregion

        #region EventVenue (Shows)

        [OperationContract]
        List<EventVenue> GetAllEventVenues();

        [OperationContract]
        EventVenue GetEventVenueById(int id);

        [OperationContract]
        void CreateEventVenue(EventVenue eventVenue);

        [OperationContract]
        void UpdateEventVenue(EventVenue eventVenue);

        [OperationContract]
        void DeleteEventVenue(EventVenue eventVenue);

        [OperationContract]
        void DeleteEventVenueById(int id);

        #endregion

        #region Ticket, TicketType, TicketTemplate, TicketQuota

        #region Ticket
        [OperationContract]
        List<Ticket> GetAllTickets();

        [OperationContract]
        List<Ticket> GetTicketsByAgentBranchNTicketTypeNQty(int agentBranchId, int ticketTypeId, int sellQty);
        [OperationContract]
        List<Ticket> GetAllTicketsByEventIdAndVenueId(int event_id, int venue_id);

        [OperationContract]
        Ticket GetTicketById(int id);

        [OperationContract]
        void CreatTicket(Ticket ticket);

        [OperationContract]
        void UpdateTicket(Ticket ticket);

        [OperationContract]
        void SellTickets(int ticketTypeId, int agentBranchId, int customerId, int quantity, int paymentModeId, decimal TotalAmount);

        [OperationContract]
        void DeleteTicket(Ticket ticket);

        [OperationContract]
        void DeleteTicketById(int id);

        #endregion

        #region TicketType
        [OperationContract]
        List<TicketType> GetAllTicketTypes();

        [OperationContract]
        TicketType GetTicketTypeById(int id);

        [OperationContract]
        void CreatTicketType(TicketType ticketType);

        [OperationContract]
        void UpdateTicketType(TicketType ticketType);

        [OperationContract]
        void DeleteTicketType(TicketType ticketType);

        [OperationContract]
        void DeleteTicketTypeById(int id);

        [OperationContract]
        List<TicketType> GetAllTicketTypesWithEventVenue();

        #endregion

        #region TicketTemplate
        [OperationContract]
        List<TicketTemplate> GetAllTicketTemplates();

        [OperationContract]
        TicketTemplate GetTicketTemplateById(int id);

        [OperationContract]
        void CreatTicketTemplate(TicketTemplate ticketTemplate);

        [OperationContract]
        void UpdateTicketTemplate(TicketTemplate ticketTemplate);

        [OperationContract]
        void DeleteTicketTemplate(TicketTemplate ticketTemplate);

        [OperationContract]
        void DeleteTicketTemplateById(int id);

        #endregion

        #region TicketQuota
        [OperationContract]
        List<TicketQuota> GetAllTicketQuotas();

        [OperationContract]
        TicketQuota GetTicketQuotaById(int id);

        [OperationContract]
        TicketQuota GetTicketQuotaLoadedById(int id);

        [OperationContract]
        void CreatTicketQuota(TicketQuota ticketQuota);

        [OperationContract]
        void UpdateTicketQuota(TicketQuota ticketQuota);

        [OperationContract]
        void DeleteTicketQuota(TicketQuota ticketQuota);

        [OperationContract]
        void DeleteTicketQuotaById(int id);

        #endregion

        #endregion

        #region Payment
      
        [OperationContract]
        List<Payment> GetAllPayments();

        [OperationContract]
        Payment GetPaymentById(int id);

        [OperationContract]
        void CreatePayment(Payment payment);

        [OperationContract]
        void UpdatePayment(Payment payment);

        [OperationContract]
        void DeletePayment(Payment payment);

        [OperationContract]
        void DeletePaymemntById(int id);

        #region Payment Modes
        [OperationContract]
        List<PaymentMode> GetAllPaymentModes();
        #endregion
        #endregion

        #region City
        [OperationContract]
        List<City> FindCities(string searchText, int maxResults);
        #endregion

    }
}
